# Maintainer: Giovanni Scafora <giovanni@archlinux.org>
# Maintainer: Maxime Gauduin <alucryd@archlinux.org>
# Contributor: 03/08/04 <lefungus@altern.org>

pkgname=libebml
pkgver=1.4.2
pkgrel=1
pkgdesc='Extensible Binary Meta Language library'
arch=(x86_64)
url=https://github.com/Matroska-Org/libebml
license=(LGPL2.1)
depends=(gcc-libs)
makedepends=(
  cmake
  git
)
provides=(libebml.so)
_tag=6c59e5e1ce0087e4465f6d3f479449d3f6bcb167
source=(git+https://github.com/Matroska-Org/libebml.git#tag=${_tag})
sha256sums=(SKIP)

pkgver() {
  cd libebml

  git describe --tags | sed 's/^release-//'
}

prepare() {
  if [[ -d build ]]; then
    rm -rf build
  fi
  mkdir build
}

build() {
  cd build

  cmake ../libebml \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DCMAKE_INSTALL_LIBDIR=/usr/lib \
    -DBUILD_SHARED_LIBS=ON
  make
}

package() {
  make DESTDIR="${pkgdir}" -C build install
}

# vim: ts=2 sw=2 et:
